﻿using Inovout.Security;
using System.Collections.Generic;
using System.Linq;

namespace Inovout.Cloud.Applications.Security.Models
{
    public partial class ApplicationUser : IApplicationUser
    {
        public virtual IList<OAuthCredential> OAuthCredentials
        {
            get
            {
                return Credentials.OfType<OAuthCredential>().ToList<OAuthCredential>() ?? new List<OAuthCredential>();
            }
        } 

        public virtual IList<PublicApiAccessCredential> PublicApiAccessCredentials
        {
            get
            {
                return Credentials.OfType<PublicApiAccessCredential>().ToList<PublicApiAccessCredential>() ?? new List<PublicApiAccessCredential>();
            }
        }

        public override bool Equals(Inovout.Models.DataObject that)
        {
            return base.Equals(that);
        }
    }
}
